Optimal. Leaf size=122 \[ \frac {2 \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 a \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {a+b \cos (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2831, 2742,
2740, 2734, 2732} \begin {gather*} \frac {2 \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 a \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {a+b \cos (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rubi steps
\begin {align*} \int \frac {\cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx &=\frac {\int \sqrt {a+b \cos (c+d x)} \, dx}{b}-\frac {a \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{b}\\ &=\frac {\sqrt {a+b \cos (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{b \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (a \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{b \sqrt {a+b \cos (c+d x)}}\\ &=\frac {2 \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 a \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {a+b \cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.55, size = 86, normalized size = 0.70 \begin {gather*} \frac {2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )}{b d \sqrt {a+b \cos (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 220, normalized size = 1.80
method | result | size |
default | \(\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \left (\EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a -\EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a +\EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) b \right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +\left (a +b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, b \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a +b}\, d}\) | \(220\) |
risch | \(-\frac {i \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right ) \sqrt {2}\, {\mathrm e}^{-i \left (d x +c \right )}}{b d \sqrt {\left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right ) {\mathrm e}^{-i \left (d x +c \right )}}}-\frac {i \left (-\frac {2 \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )}{b \sqrt {\left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right ) {\mathrm e}^{i \left (d x +c \right )}}}+\frac {2 \left (a +\sqrt {a^{2}-b^{2}}\right ) \sqrt {\frac {\left ({\mathrm e}^{i \left (d x +c \right )}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right ) b}{a +\sqrt {a^{2}-b^{2}}}}\, \sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}}{-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}}}\, \sqrt {-\frac {b \,{\mathrm e}^{i \left (d x +c \right )}}{a +\sqrt {a^{2}-b^{2}}}}\, \left (\left (-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right ) \EllipticE \left (\sqrt {\frac {\left ({\mathrm e}^{i \left (d x +c \right )}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right ) b}{a +\sqrt {a^{2}-b^{2}}}}, \sqrt {-\frac {a +\sqrt {a^{2}-b^{2}}}{b \left (-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right )}}\right )+\frac {\left (-a +\sqrt {a^{2}-b^{2}}\right ) \EllipticF \left (\sqrt {\frac {\left ({\mathrm e}^{i \left (d x +c \right )}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right ) b}{a +\sqrt {a^{2}-b^{2}}}}, \sqrt {-\frac {a +\sqrt {a^{2}-b^{2}}}{b \left (-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right )}}\right )}{b}\right )}{b \sqrt {b \,{\mathrm e}^{3 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )} b}}\right ) \sqrt {2}\, \sqrt {\left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right ) {\mathrm e}^{i \left (d x +c \right )}}\, {\mathrm e}^{-i \left (d x +c \right )}}{d \sqrt {\left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right ) {\mathrm e}^{-i \left (d x +c \right )}}}\) | \(749\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.12, size = 355, normalized size = 2.91 \begin {gather*} \frac {2 i \, \sqrt {2} a \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) - 2 i \, \sqrt {2} a \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) + 3 i \, \sqrt {2} b^{\frac {3}{2}} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right ) - 3 i \, \sqrt {2} b^{\frac {3}{2}} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right )}{3 \, b^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos {\left (c + d x \right )}}{\sqrt {a + b \cos {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.66, size = 80, normalized size = 0.66 \begin {gather*} \frac {2\,\left (\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |\frac {2\,b}{a+b}\right )\,\left (a+b\right )-a\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |\frac {2\,b}{a+b}\right )\right )\,\sqrt {\frac {a+b\,\cos \left (c+d\,x\right )}{a+b}}}{b\,d\,\sqrt {a+b\,\cos \left (c+d\,x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________